{$header}
<div id="main" class="main" >
    <div class="content">
  <h3 class="heading">查看编辑赠品组合 [ <a href="__URL__">返回列表</a> ]</h3>
<div id="result" class="result none"></div>


<table cellpadding=3 cellspacing=3 >
<form class="form-horizontal well" method='post' id="form1" name="form1" action="__URL__/update/">
<tr>
    <td class="tRight" width="150px">赠品组合名称：</td>
	<td class="tLeft" >
            <input  class="large" name="name" value="{$vo.name}">
        </td>
</tr>
<tr>
    <td class="tRight">备注说明：</td>
        <td class="tLeft"><textarea class="span8" name="remark" rows="3">{$vo.remark}</textarea>
        </td>
</tr>
<tr>
    <td></td>
    <td class="center" width="300">
        <input type="hidden" value="{$vo.id}" name="id">
    <button type="submit" class="btn btn-primary"><i class="icon-ok icon-white"></i> 保存</button>
    <button type="reset" onclick="javascript:history.back()" class="btn btn-primary offset1"><i class="icon-arrow-left icon-white"></i> 返回</button>
    </td>
</tr>
</form>
<tr><td colspan="3" class="heading h4 alert alert-info">赠品组合 </td> 
        <td>
        <a href="__APP__/Gift_detail/add/id/{$vo.id}" class="btn btn-primary">添加赠品</a>
        </td>
        
    </tr>
    <tr>
        <td colspan="4">
            <table class="table table-bordered table-striped">
                <tr>
                    <th>序号</th><th>销售标题</th><th class="span2">规格</th><th>商品编号</th><th>商品名称</th><th>价格</th><th>数量</th><th class="span1">单位</th><th>修改</th><th>删除</th>
                </tr>
                <php>$gift_details = M('Gift_detail')->where('gift_id ="'.$vo['id'].'"')->findAll(); </php>
                <volist name="gift_details" id="sa">
                    <form action="__APP__/Gift_detail/update" method="post">
                    <tr>
                        <td>{$key+1} <input type="hidden" name="id" value="{$sa.id}"> </td>
                        <td><input type="text" name="name" value="{$sa.name}" class="span4" > </td>
                        <td>
                           {$sa.goods_id|printGoodsOption}
                        </td>
                        <td>{$sa.goods_id}</td>
                        <td>{$sa.goods_id|getModelName='Product'}</td>
                        <td>{$sa.price}
                            <input type="hidden" name="price" value="{$sa.price}">
                        </td>
                        <td><input type="text" name="number" value="{$sa.number}" class="span1" > </td>
                        <td>{$sa.goods_id|getProductUnit}</td>
                        <td> 
                            <input type="hidden" name="jumpUrl" value="__URL__/edit/id/{$vo.id}">
                            <input type="submit" value="修改" class ="btn"> 
                        </td>
                        <td>
                            <a href="__APP__/Gift_detail/foreverdelete/id/{$sa.id}" class="btn">删除</a>  
                        </td>
                    </tr>
                    </form>
                </volist>
            </table>
        </td>
    </tr>
</table>
</div>
</div>
<include file="Public:footer" />
